 <?php
 	if(isset($_POST['submitMail']))
 	{
		require_once('scripts/recaptchalib.php');
		$privatekey = "6LdBW80SAAAAAP_ghcXk754uMm2pbM_fX88eZj-J";
		$resp = recaptcha_check_answer ($privatekey,
		                            $_SERVER["REMOTE_ADDR"],
		                            $_POST["recaptcha_challenge_field"],
		                            $_POST["recaptcha_response_field"]);
		
		if (!$resp->is_valid) {
		// What happens when the CAPTCHA was entered incorrectly
		die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
		     "(reCAPTCHA said: " . $resp->error . ")");
		     
		echo "FAILED!";
		} else {
		// Your code here to handle a successful verification
		echo "CORRECT!";
		}
	 }
  ?>
<!DOCTYPE HTML>

<html>

<!-- #BeginTemplate "main.dwt" -->

	<head>
<!-- #BeginEditable "doctitle" -->
		<title>Get Connected | TFT</title>
<!-- #EndEditable -->
		
		<link rel="icon" href="favicon.ico"> 
		<link href="css/styles.css" rel="stylesheet" type="text/css" media="screen">
		<link href="css/nivo-slider.css" rel="stylesheet" type="text/css" media="screen">
		<link href="css/pascal.css" rel="stylesheet" type="text/css" media="screen">	
		<link href="css/jquery-blacktie-ui.css" rel="stylesheet" type="text/css" media="screen">	
		
		<script type="text/javascript" src="js/jquery.js"></script>
		<script type="text/javascript" src="js/jquery-ui.js"></script>
    	<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
    	<script type="text/javascript" src="js/menu.js"></script>
		<script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script>
	
	    <script type="text/javascript">
		    $(window).load(function() {
		        $('#slider').nivoSlider();
		    });
	    </script>
<!-- #BeginEditable "otherHeads" -->

		<!--Popup Script-->
		<script>
			var nicheBool = false;
			var contactBool = false;		
						
			$(document).ready(function() 
			{
   				//$("#contactForm").dialog({autoOpen:false, width:370, resizable:false});
   				//$("#contactForm").dialog("open");
   				
   				$("#docs-form").hide();
   				$("#nicheForm").hide();
   				$("#contactForm").hide();
   				
   				$("#nicheButton").click(function() 
   				{
   					if(nicheBool == true)
					{
						document.getElementById("nicheButton").innerHTML = "Join a Niche Now!";
						$("#nicheForm").hide("slide", { direction: "up" }, 1000);
						nicheBool = false;
					}
					
					else
					{
						document.getElementById("nicheButton").innerHTML = "Join a Niche Now! [Close Form]";
						$("#nicheForm").show("slide", { direction: "up" }, 1000);
						nicheBool = true;
					}
   				});
   				
   				$("#contactButton").click(function()
   				{
   					if(contactBool == true)
					{
						document.getElementById("contactButton").innerHTML = "Send an E-mail.";
						$("#contactForm").hide("slide", { direction: "up" }, 1000);
						contactBool = false;
					}
					
					else
					{
						document.getElementById("contactButton").innerHTML = "Send an E-mail. [Close Form]";
						$("#contactForm").show("slide", { direction: "up" }, 1000);
						contactBool = true;
					}
   				});

  			});
		</script>
				
		<!--Niche Submit Script-->
		<script>			
			var errorBool = true;
		
			function checkForm()
			{
				if(document.getElementById("name").value.length < 2)
				{
					alert("Please Enter Your Name");
					return false;
				}
				
				else if(document.getElementById("age").value.length < 1)
				{
					alert("Please Enter Your Age");
					return false;
				}
				
				else if(document.getElementById("email").value.length < 2)
				{
					alert("Please Enter a Valid E-mail Address")
					return false;
				}
				
				else if(document.getElementById("availability").value.length < 2)
				{
					alert("Please Enter Your Availability");
					return false;
				}
				
				return true;					
			}
		
			function submitForm()
			{
				var boool = checkForm();
			
				if(boool)
				{							
					document.getElementById("entry_0").value = document.getElementById("name").value;
					document.getElementById("entry_1").value = document.getElementById("gender").value;
					document.getElementById("entry_2").value = document.getElementById("age").value;
					document.getElementById("entry_5").value = document.getElementById("email").value;
					document.getElementById("entry_7").value = document.getElementById("number").value;
					document.getElementById("entry_3").value = document.getElementById("availability").value;
					document.getElementById("entry_6").value = document.getElementById("comments").value;
					
					document.getElementById("submitDocsFormButton").click();							
				}		
			}
			
			function submitConfirm()
			{
				var r = confirm("Submit Form?");
				
				if (r==true)
				{
				  submitForm();
				}
			}
		</script>
		
		<!-- Facebook Post to Feed Script -->
		<script src='http://connect.facebook.net/en_US/all.js'></script>
		<script> 
			FB.init({appId: "154494801328363", status: true, cookie: true});
			
			function postToFeed() 
			{
				// calling the API ...
				var obj = {
				  method: 'feed',
				  link: 'https://developers.facebook.com/docs/reference/dialogs/',
				  picture: 'http://fbrell.com/f8.jpg',
				  name: 'Join a Niche with me!',
				  caption: 'What is a Niche?',
				  description: "It is a small group meeting that is designed to help a student grow in his/her relationship with God and others through God's word and prayer."
				};
				
				function callback(response) {
				  document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
				}
				
				FB.ui(obj, callback);
			}
	    
	    </script>

<!-- #EndEditable -->
	</head>

	<body>		
		<div id="wrapper">	
			<div id="upperbar">
			
				<div id="logo">
						<img src="images/logo.png" alt="That Friday Thing"/>
				</div>
					
				<div id="social">
					<ul>
						<li><a href="https://www.facebook.com/thatfridaything"><img src="images/icons/facebook.png"></a></li>
						<li><a href="https://twitter.com/thatfridaything"><img src="images/icons/twitter-2.png"></a></li>
					</ul>	
				</div>					
		
				<div id="menu">			
				    <ul class="menu">
				        <li id="index"			><a href="index.html"><span>Welcome</span></a></li>
				        <li id="get_connected"  ><a href="get_connected.php"><span>Get Connected</span></a></li>
				        <li id="blogs"          ><a href="blogs.php"><span>Blogs</span></a></li>
				        <li class="parent"		><a href="media.html"><span>Media</span></a>
				        	<div>
				        		<ul>
				        			<li><a href="#"><span>PODCASTS</span></a></li>
				        			<li><a href="#"><span>PHOTOS</span></a></li>
									<li><a href="#"><span>VIDEOS</span></a></li>
				        		</ul>
				        	</div>
				        </li>
				    </ul>
				</div>
				
							
			</div>
			
<!-- #BeginEditable "navClass" -->			
			<script type="text/javascript">
				document.getElementById("get_connected").className="current";
			</script>
<!-- #EndEditable -->
			
			<div id="banner">
				<div class="slider-wrapper theme-pascal">
		            <div class="ribbon"></div>
		            
		            <div id="slider" class="nivoSlider">
		                <img src="images/banner1.png" alt="" />
		                <img src="images/banner2.png" alt="" />		                
		                <img src="images/banner3.png" alt="" data-transition="slideInLeft" />
		            </div>		            
        		</div>			
        	</div>
        	
			<div id="content">
<!-- #BeginEditable "content" -->
			
			<div id="content0">
			
			<!------------------------------------- Join a Niche -------------------------------------------------->

				<h1 class="hFont">Get Plugged In To A Niche!</h1>
				<h4>What is a Niche?</h4>
				<p class="cFont">
					A niches is a small group meeting that is designed to help a student grow in his/her relationship with 
					God and others through God's word and prayer. In a niche, a student doesn't just get an impartation 
					of faith and passion for God but also the desire to start reaching out to his/her sphere of influence.<br/>			
					<span id="nicheButton" class="jLink">Join a Niche now!</span>
				</p>					    
				
				<style>
					.r{
						color:#F00;
					}
					.formDesc{
						font-size:9px;
					}
				</style>
				
				<div id="nicheForm" class="connect-form" title="Join a Niche">			
					<form name="niche" method="post" action="">
						
						<span class="r"><em>Required*</em></span>
						
						<ol>						
							<li id="nameBorder">
								<label for="name">Name<span class="r">*</span></label>
								<input type="text" name="name" id="name">
							</li>
							
							<li>
								<label for="gender">Gender<span class="r">*</span></label>
								<select name="gender" id="gender">
									<option>Male</option>
									<option>Female</option>
								</select>
							</li>
							
							<li id="ageBorder">
								<label for="age">Age<span class="r">*</span></label>
								<input type="text" name="age" id="age">
							</li>
							
							<li id="emailBorder">
								<label for="email">Email<span class="r">*</span></label>
								<input type="text" name="email" id="email">
							</li>
							
							<li id="contactBorder">
								<label for="number">Contact Number</label>
								<input type="text" name="number" id="number">
							</li>
															
							<li id="availableBorder">
								<label for="availability">Available Days and Time<span class="r">*</span><br/><span class="formDesc">Ex.Friday-Morning/Afternoon/Night</span></label>
								<textarea name="availability" id="availability" cols="45" rows="45"></textarea>
							</li>
							
							<li>
								<label for="comments">Other Comments</label>
								<textarea name="comments" id="comments" cols="45" rows="45"></textarea>
							</li>

	
							<li>
								<input type="button" name="submitNiche" class="submit" id="submitNiche" value="Submit" onclick="submitConfirm()">
							</li>
						</ol>			
					</form>												
				</div>
				
				<p>
					Already Have a niche? 
					<span onclick='postToFeed(); return false;' class="jLink"> Invite your friends on Facebook.</span>
				</p>										

				
				<!------------------------------------- E-mail Us -------------------------------------------------->
				
				<h1 class="hFont">Got Questions? E-mail Us!</h1>
				<p class="cFont">
					Description description description? <span id="contactButton" class="jLink">Send an E-mail.</span>
				</p>
									
				<div id="contactForm" class="connect-form" title="Contact Us">
					<form name="contact" method="post" action="get_connected.php">
						<ol>
							<li><label for="name0">Name</label>
								<input type="text" name="name" id="name0">
							</li>
							
							<li>
								<label for="email0">Email</label>
								<input type="text" name="email" id="email0">
							</li>
	
							<li>
								<label for="comments0">Comments</label>
								<textarea name="comments" id="comments0" cols="45" rows="45"></textarea>
							</li>
							
							<?php
								require_once('scripts/recaptchalib.php');
								$publickey = "6LdBW80SAAAAAJQi5GAsQq9k-_FXg0OhszU_Rlpb"; 
								echo recaptcha_get_html($publickey);
					        ?>

							<li>
								<input name="submitMail" type="submit" class="submit" id="submitMail" value="Submit">
							</li>
						</ol>			
					</form>
				</div>
				
				<!------------------------------------- Google Docs Form -------------------------------------------------->				
				<div id="docs-form">
					<iframe id="fakeTarget"></iframe>
					<form target="fakeTarget" action="https://docs.google.com/spreadsheet/formResponse?hl=en_US&amp;formkey=dHJJMTBqSDdNcUlGcUU0ZzZoelVCZUE6MQ&amp;theme=0AX42CRMsmRFbUy03NThiZTgyMi1iNWZiLTQ1ZTUtYmJkZi00ZDMzODQ4NzA5YWI&amp;ifq" method="POST" id="ss-form">
						<br>
						<div class="errorbox-good">
						<div class="ss-item ss-item-required ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_0">Name
						<span class="ss-required-asterisk">*</span></label>
						<label class="ss-q-help" for="entry_0"></label>
						<input type="text" name="entry.0.single" value="" class="ss-q-short" id="entry_0"></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item ss-item-required ss-select"><div class="ss-form-entry"><label class="ss-q-title" for="entry_1">Gender
						<span class="ss-required-asterisk">*</span></label>
						<label class="ss-q-help" for="entry_1"></label>
						<select name="entry.1.single" id="entry_1"><option value="Male">Male</option> <option value="Female">Female</option></select></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item ss-item-required ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_2">Age
						<span class="ss-required-asterisk">*</span></label>
						<label class="ss-q-help" for="entry_2"></label>
						<input type="text" name="entry.2.single" value="" class="ss-q-short" id="entry_2"></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item  ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_5">E-mail
						</label>
						<label class="ss-q-help" for="entry_5"></label>
						<input type="text" name="entry.5.single" value="" class="ss-q-short" id="entry_5"></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item ss-item-required ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_7">Contact Number
						<span class="ss-required-asterisk">*</span></label>
						<label class="ss-q-help" for="entry_7"></label>
						<input type="text" name="entry.7.single" value="" class="ss-q-short" id="entry_7"></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item ss-item-required ss-paragraph-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_3">Available Days and Time
						<span class="ss-required-asterisk">*</span></label>
						<label class="ss-q-help" for="entry_3">Ex. Friday - 5:00-6:00</label>
						<textarea name="entry.3.single" rows="8" cols="75" class="ss-q-long" id="entry_3"></textarea></div></div></div>
						<br> <div class="errorbox-good">
						<div class="ss-item  ss-paragraph-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_6">Other Comments
						</label>
						<label class="ss-q-help" for="entry_6"></label>
						<textarea name="entry.6.single" rows="8" cols="75" class="ss-q-long" id="entry_6"></textarea></div></div></div>
						<br>
						<input type="hidden" name="pageNumber" value="0">
						<input type="hidden" name="backupCache" value="">						
						<div class="ss-item ss-navigate"><div class="ss-form-entry">
						<input type="submit" name="submit" value="Submit" id="submitDocsFormButton"></div></div>
					</form>
				</div>							
			</div>
			
<!-- #EndEditable -->
			</div>
			
			<div id="sidebar">
<!-- #BeginEditable "sidebar" -->
			
				<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fthatfridaything&amp;width=275&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=false&amp;appId=154494801328363" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:275px; height:258px;" allowTransparency="false"></iframe>
			
				<div id="twitter">
					<script type="text/javascript">
						new TWTR.Widget({
						  version: 2,
						  type: 'search',
						  search: 'thatfridaything',
						  interval: 30000,
						  title: 'Tweets about That Friday Thing',
						  subject: '#ThatFridayThing',
						  width: 275,
						  height: 300,
						  theme: {
						    shell: {
						      background: '#00648f',
						      color: '#ffffff'
						    },
						    tweets: {
						      background: '#ffffff',
						      color: '#444444',
						      links: '#1985b5'
						    }
						  },
						  features: {
						    scrollbar: true,
						    loop: false,
						    live: true,
						    behavior: 'all'
						  }
						}).render().start();
					</script>
				</div>
			
<!-- #EndEditable -->
				
			</div>
			
			<div id="footer">
				<hr/>
				<a href="http://victoryfort.org"><img id="footerIcon" src="images/footer_icon.png"></a>
				
				<div id="bottomText">
				
					<span id="bottomLinks">
						<a href="#">Welcome</a> | <a href="#">Get Connected</a> | <a href="#">Events</a> | <a href="#">Gallery</a> | <a href="#">Resources</a>
					</span>
				
					<div id="info">
						<p>That Friday Thing is part of the youth ministry of <a href="http://victoryfort.org">Victory Fort Bonifacio</a></p>
						<p>32nd St. corner University Parkway, Bonifacio Global City, Taguig 1634 Philippines<p>
						<p>&copy; 2012 That Friday Thing<p>
						
						<span hidden="hidden">Navigation Menu from <a href="http://apycom.com/">Apycom jQuery Menus</a></span>
					</div>
					
				</div>
			</div>
		</div>		
	</body>
<!-- #EndTemplate -->
</html>
